#include "commands.h"

void toggle_status(void *payload) {
    assert(payload == NULL);

    /* toggle using cmus-remote */
    FILE *fp = popen("cmus-remote -u 2>&1", "r");
    if (fp == NULL) {
        fprintf(stderr, "cmus-remote error: command not found or failed to run\n");
        exit(EXIT_FAILURE);
    }
    pclose(fp);
}